package com.jz.cost.enums;

/**
 * Created by WISE on 2021/12/28.
 */
//枚举
public enum JizhangEnum {

    QIYONG(1, "账本记账"), JINYONG(2, "其他");
    private Integer status;

    private String statusName;

    JizhangEnum(Integer status, String statusName) {
        this.status = status;
        this.statusName = statusName;
    }

    public Integer getStatus() {

        return status;
    }

    public String getStatusName() {

        return statusName;
    }


    public static String getNameByStatus(Integer status) {

        for (JizhangEnum subStatusEnum : JizhangEnum.values()) {
            if (subStatusEnum.getStatus() == status){

                return subStatusEnum.getStatusName();
            }

        }

        return null;

    }


}


